package com.banzhi.shop.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.banzhi.shop.R;
import com.banzhi.shop.entity.Award;
import com.banzhi.shop.utils.DateUtil;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2017/12/13.
 */

public class AwardAdapter extends BaseQuickAdapter<Award, BaseViewHolder> {
    public AwardAdapter(@LayoutRes int layoutResId, @Nullable List<Award> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Award item) {
        helper.setText(R.id.tvNo, item.getLogno()).setText(R.id.tvAward, item.getMoney() + "元")
                .setText(R.id.tvTime, DateUtil.getData(item.getCreatetime())).addOnClickListener(R.id.tvCopy);
    }
}